package com.zxjia.ssmp.service.impl;

import com.zxjia.ssmp.dto.OrderRequest;
import com.zxjia.ssmp.dto.PayRequest;
import com.zxjia.ssmp.service.OrderService;
import com.zxjia.ssmp.service.PayService;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PayServiceImpl  implements PayService {

    @Autowired
    private OrderService orderService;


    @Override
    public Boolean payment(PayRequest payRequest) {
        OrderRequest orderRequest = new OrderRequest();
        BeanUtils.copyProperties(payRequest,orderRequest);
        return orderService.updateOrderState(orderRequest);
    }
}
